﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.EntityValidation
{
    public class IPAttribute : RegExValidationAttribute
    {
        public IPAttribute()
        {

            RegEx = @"^((25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))$";  //
            ErrorMessage = "请输入正确的IP地址";
        }
    }
}
